<!--#include file="inc/conn1.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim username,password
username=replace(trim(request("username")),"'","")
password=md5(replace(trim(request("password")),"'","")&IMS_CookieRndString)

safecode=Session("SafeCode")
verifycodes= Trim(request("Verifycode"))
if verifycodes=""  then
 verifycodes=1
end if
if int(verifycodes)<>int(safecode)   then
 Response.Write "<script>alert('输入的验证码错误！');history.back();</script>"
 response.End()				
end if

set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [system_meng] where admin_user='"&username&"' and admin_pwd='"&password&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
	  Session("admin_Name")=trim(rs("admin_Name"))
	  Response.cookies("administrator")=trim(rs("admin_user"))
	  session.Timeout=60
	  call rsclose(rs)
	  
	  Response.Redirect "manage_main.html"
else
	response.write "<script LANGUAGE='javascript'>alert('对不起，用户名或者密码错误！');history.go(-1);</script>"
end if
%>